import config from './config'
let baseUrl=''

//#ifdef H5
baseUrl=config.reqUrl.h5Host
//#endif

//#ifdef MP-WEIXIN
baseUrl=config.reqUrl.mpHost
//#endif

export default (url, data, Method = 'GET') => {
	return new Promise((resolve, reject) => {
		uni.request({
			url:`${baseUrl}${url}`,
			data,
			success: (res) => {
				resolve(res.data)
			}
		})
	})
}
